<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>publish</title>
    <link type="text/css" href="/manage/static/css/manage.css" rel="stylesheet"/>
</head>
<body>
    <div class="tab-title">
        <h3>发布</h3>
    </div>
    <div class="tab-content">
        <form action="/manage/author/news/publish" method="post">
            <table>
                <tr class="tab-line">
                    <td>&nbsp;</td>
                    <td class="tab-input">
                        <input type="text" name="title" placeholder="新闻标题"/>
                    </td>
                    <td class="tab-info"><span class="tab-info-icon">*</span>必须录入新闻标题</td>
                </tr>
                <tr class="tab-line">
                    <td>&nbsp;</td>
                    <td class="tab-input">
                        <input type="text" name="keywords" placeholder="关键字"/>
                    </td>
                    <td class="tab-info"><span class="tab-info-icon">*</span>必须录入关键字</td>
                </tr>
                <tr class="tab-line">
                    <td>&nbsp;</td>
                    <td class="tab-input">
                        <c:if test="${categories!=null}">
                            <select name="categoryId" class="tab-select" >
                            <c:forEach items="${categories}" var="category">
                                <option value="${category.id}">${category.name}</option>
                            </c:forEach>
                            </select>
                        </c:if>
                        <c:if test="${categories==null}">
                            <input type="text" name="categoryId" placeholder="分类"/>
                        </c:if>
                    </td>
                    <td class="tab-info"><span class="tab-info-icon">*</span>必须分类</td>
                </tr>
                <tr class="tab-line">
                    <td>&nbsp;</td>
                    <td class="tab-input" colspan="2">
                        <textarea name="content" rows="20">新闻内容</textarea>
                    </td>
                </tr>
            </table>
            <div class="tab-line-submit">
                <p>
                    <input type="submit" value="发布"/>
                </p>
            </div>
        </form>
    </div>
</body>
</html>
